package org.jeecg.modules.hc.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hc.entity.HcMerchantData;
import org.jeecg.modules.hc.entity.HcOrderDetailed;
import org.jeecg.modules.hc.entity.HcOrderMerchant;
import org.jeecg.modules.hc.entity.HcOrderMerchantExport;

import java.util.List;
import java.util.Map;

/**
 * @Description: 商家订单
 * @Author: jeecg-boot
 * @Date:   2022-12-20
 * @Version: V1.0
 */
public interface HcOrderMerchantMapper extends BaseMapper<HcOrderMerchant> {

    List<Map> queryGlobalData1(JSONObject param);

    List<Map> queryGlobalData2(JSONObject param);

    IPage<HcOrderMerchant> getPayOrderListByMerchantId(Page<HcOrderMerchant> page, String merchantId);

    /**
     * 根据商家id和参数查询有效订单
     * @param page
     * @param param
     * @return
     */
    IPage<HcOrderMerchant> getOrderListByMerchantId(Page<HcOrderMerchant> page, HcOrderMerchant param);

    List<Map> getStatisticsList(Map param);

    Map getOrderStatisticsOfGlobalPage(String beginTime, String endTime);

    IPage<HcOrderMerchant> getOrderListOfGlobalPage(Page<HcOrderMerchant> page, HcOrderMerchant param);

    HcMerchantData getHcMerchantData(String merchantId);
    HcMerchantData getHcMerchantDataNew(String merchantId);
    HcMerchantData getMerchantDataRecord(String merchantId, String beginTime, String endTime);

    List<HcOrderMerchantExport> getExportList(String merchantId, List<String> ids, String type);

    List<HcOrderDetailed> getOrderStatistics(String merchantId);

    /**
     * 根据用户id查询订单列表
     * @param page
     * @param param
     * @return
     */
    IPage<HcOrderMerchant> getList(Page<HcOrderMerchant> page, HcOrderMerchant param);

    /**
     * 平台端查询订单列表
     * @param page
     * @param param
     * @return
     */
    IPage<HcOrderMerchant> pageList(Page<HcOrderMerchant> page, @Param("param") HcOrderMerchant param);

    IPage<HcOrderMerchant> getListByAddress(Page<HcOrderMerchant> page, HcOrderMerchant param);
}
